package com.example.scaffold.organization.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.scaffold.common.bean.PageResult;
import com.example.scaffold.organization.bean.OrganizationDTO;
import com.example.scaffold.organization.bean.OrganizationEditParam;
import com.example.scaffold.organization.bean.OrganizationQueryParam;
import com.example.scaffold.organization.bean.OrganizationVO;
import com.example.scaffold.organization.entity.Organization;

/**
 * 机构服务接口
 * 遵循阿里手册：服务层命名规范，接口设计规范
 *
 * @author example
 */
public interface OrganizationService extends IService<Organization> {

    /**
     * 根据ID查询机构
     *
     * @param id 机构ID
     * @return 机构信息
     */
    OrganizationDTO getOrganizationById(Long id);

    /**
     * 创建机构
     *
     * @param param 机构信息
     * @return 机构ID
     */
    Long createOrganization(OrganizationEditParam param);

    /**
     * 更新机构
     *
     * @param id    机构ID
     * @param param 机构信息
     * @return 是否成功
     */
    boolean updateOrganization(Long id, OrganizationEditParam param);

    /**
     * 删除机构
     *
     * @param id 机构ID
     * @return 是否成功
     */
    boolean deleteOrganization(Long id);

    /**
     * 根据属性查询机构
     * @param param 查询参数
     * @return 分页结果
     */
    PageResult<OrganizationVO> listOrganization(OrganizationQueryParam param);
}